from sqlalchemy import select
from sqlalchemy.ext.asyncio import AsyncSession

from app.database.models import Site


async def get_site(session: AsyncSession, site_id: int) -> Site:

    q = select(Site).where(Site.id == site_id)
    res = await session.execute(q)

    return res.scalar()
